package com.xdhl.fu.member.api;

import com.xdhl.fu.common.core.constant.SecurityConstants;
import com.xdhl.fu.common.core.constant.ServiceNameConstants;
import com.xdhl.fu.common.core.domain.R;
import com.xdhl.fu.member.api.factory.RemoteMemberBasicFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 会员服务
 *
 * @author 朱力维
 * @time 2022/6/11 21:11
 */
@FeignClient(contextId = "remoteMemberService", value = ServiceNameConstants.MEMBER_SERVICE, fallbackFactory =
        RemoteMemberBasicFallbackFactory.class)
public interface RemoteMemberBasicService {
    /**
     * 根据Token获取会员数据Id
     *
     * @param token  会员Token
     * @param source 请求来源
     * @return 会员数据Id
     */
    @GetMapping("/basic/data-id-self")
    R<String> getDataIdSelf(@RequestParam("token") String token, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);


}
